package priv.dajie.tzzq.model;

import priv.dajie.tzzq.common.enumTypeHandler.BaseEnum;

public enum SellGoodsState implements BaseEnum<String> {
    // 冷却中 待上架 待出售 已出售 其他
    WAIT("冷却中"), STEAM_PACKAGE("steam背包"), C5_PACKAGE("c5背包"), BUFF_PACKAGE("buff背包"), SELLING("待出售"),
    SUCCESS("已出售"),SOLD("被购买"), OTHER("其他");

    private String state;

    SellGoodsState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return state;
    }

    public static SellGoodsState getSellGoodsState(String state) {
        switch (state) {
            case "冷却中":
                return WAIT;
            case "steam背包":
                return STEAM_PACKAGE;
            case "c5背包":
                return C5_PACKAGE;
            case "buff背包":
                return BUFF_PACKAGE;
            case "待出售":
                return SELLING;
            case "被购买":
                return SOLD;
            case "已出售":
                return SUCCESS;
            default:
                return OTHER;
        }
//        return SellGoodsState.OTHER;
    }

    @Override
    public String getDictKey() {
        return state;
    }
}
